Page({
    data: {
      previewImage: ''
    },
    onLoad() {},
    selectImage() {
      const that = this;
      wx.chooseMedia({
        count: 1,
        mediaType:'image',
        sizeType: ['original', 'compressed'],
        sourceType: ['album', 'camera'],
        camera: 'front',
        success (res) {
          const tempFiles = res.tempFiles
          console.log(tempFiles)
          that.setData({
            previewImage: tempFiles[0].tempFilePath
          })
        }
      })
    },
});
